Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FTS] real robot tested on hsrb and donbot #230

Merged
merged 7 commits into from
Nov 29, 2024
Merged

Conversation

sunava
Copy link
Collaborator

@sunava sunava commented Nov 27, 2024

[fts] Butterworth filter for Force Torque Sensor

  • tested on hsr and donbot in real
  • test cases with mockup

for understanding:
The @patch decorator in Python is used in unit testing to replace objects in your code with mock objects during the test. This allows you to control the behavior of dependencies and isolate the code under test. It is part of the unittest.mock module.
Here is a brief explanation of how it works:

  • @patch replaces the specified object with a mock object.
  • The mock object can be configured to return specific values or raise exceptions.
  • After the test, the original object is restored.

Example usage:

from unittest.mock import patch

@patch('module.ClassName')
def test_function(mock_class):
    # mock_class is a mock object replacing module.ClassName
    instance = mock_class.return_value
    instance.method.return_value = 'mocked value'

    # Your test code here

Copy link
Collaborator

@tomsch420 tomsch420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also provide test cases

src/pycram/ros/custom_filter.py Outdated Show resolved Hide resolved
src/pycram/ros/custom_filter.py Outdated Show resolved Hide resolved
src/pycram/ros/custom_filter.py Outdated Show resolved Hide resolved
src/pycram/ros_utils/force_torque_sensor.py Show resolved Hide resolved
src/pycram/ros_utils/force_torque_sensor.py Outdated Show resolved Hide resolved
src/pycram/ros_utils/force_torque_sensor.py Outdated Show resolved Hide resolved
@sunava sunava changed the title Fts real robot [FTS] real robot tested on hsrb and donbot Nov 29, 2024
@sunava sunava merged commit dc08b13 into cram2:dev Nov 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants